﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace StockTrader.BusinessService.DataContract
{
    [DataContract()]
    public class StockDataModel
    {
        private DateTime _transDate;
        public System.DateTime TransDate
        {
            get { return _transDate; }
            set { _transDate = value; }
        }
        private string _symbol;
        public string Symbol
        {
            get { return _symbol; }
            set { _symbol = value; }
        }
        private List<CustomAttribute> _companyInfo;
        public List<CustomAttribute> CompanyInfo
        {
            get { return _companyInfo; }
            set { _companyInfo = value; }
        }
        private List<FinancialPeriod> _financePeriod;
        public List<FinancialPeriod> FinancePeriod
        {
            get { return _financePeriod; }
            set { _financePeriod = value; }
        }
        private int _companyInfoStyle;
        public int CompanyInfoStyle
        {
            get { return _companyInfoStyle; }
            set { _companyInfoStyle = value; }
        }
        private int _financialStandard;
        public int FinancialStandard
        {
            get { return _financialStandard; }
            set { _financialStandard = value; }
        }
        private int _quoteNo;
        public int QuoteNo
        {
            get { return _quoteNo; }
            set { _quoteNo = value; }
        }
        private int _status;
        public int Status
        {
            get { return _status; }
            set { _status = value; }
        }
        private decimal _ceiling;
        public decimal Ceiling
        {
            get { return _ceiling; }
            set { _ceiling = value; }
        }
        private decimal _floor;
        public decimal Floor
        {
            get { return _floor; }
            set { _floor = value; }
        }
        private decimal _priorClosePrice;
        public decimal PriorClosePrice
        {
            get { return _priorClosePrice; }
            set { _priorClosePrice = value; }
        }
        private decimal _refPrice;
        public decimal RefPrice
        {
            get { return _refPrice; }
            set { _refPrice = value; }
        }
        private DateTime _issueDate;
        public System.DateTime IssueDate
        {
            get { return _issueDate; }
            set { _issueDate = value; }
        }
        private int _dateNo;
        public int DateNo
        {
            get { return _dateNo; }
            set { _dateNo = value; }
        }
        private long _totalListingQtty;
        public long TotalListingQtty
        {
            get { return _totalListingQtty; }
            set { _totalListingQtty = value; }
        }
        private int _yieldMat;
        public int YieldMat
        {
            get { return _yieldMat; }
            set { _yieldMat = value; }
        }
        private long _adjustQtty;
        public long AdjustQtty
        {
            get { return _adjustQtty; }
            set { _adjustQtty = value; }
        }
        private decimal _highestPrice;
        public decimal HighestPrice
        {
            get { return _highestPrice; }
            set { _highestPrice = value; }
        }
        private decimal _lowestPrice;
        public decimal LowestPrice
        {
            get { return _lowestPrice; }
            set { _lowestPrice = value; }
        }
        private decimal _lastPrice;
        public decimal LastPrice
        {
            get { return _lastPrice; }
            set { _lastPrice = value; }
        }
        private long _lastQtty;
        public long LastQtty
        {
            get { return _lastQtty; }
            set { _lastQtty = value; }
        }
        private decimal _matchPrice;
        public decimal MatchPrice
        {
            get { return _matchPrice; }
            set { _matchPrice = value; }
        }
        private long _matchQtty;
        public long MatchQtty
        {
            get { return _matchQtty; }
            set { _matchQtty = value; }
        }
        private int _bidCount;
        public int BidCount
        {
            get { return _bidCount; }
            set { _bidCount = value; }
        }
        private int _offerCount;
        public int OfferCount
        {
            get { return _offerCount; }
            set { _offerCount = value; }
        }
        private long _bidQtty;
        public long BidQtty
        {
            get { return _bidQtty; }
            set { _bidQtty = value; }
        }
        private long _offerQtty;
        public long OfferQtty
        {
            get { return _offerQtty; }
            set { _offerQtty = value; }
        }
        private int _sellCount;
        public int SellCount
        {
            get { return _sellCount; }
            set { _sellCount = value; }
        }
        private long _sellTotalQtty;
        public long SellTotalQtty
        {
            get { return _sellTotalQtty; }
            set { _sellTotalQtty = value; }
        }
        private int _buyCount;
        public int BuyCount
        {
            get { return _buyCount; }
            set { _buyCount = value; }
        }
        private long _buyTotalQtty;
        public long BuyTotalQtty
        {
            get { return _buyTotalQtty; }
            set { _buyTotalQtty = value; }
        }
        private long _normalQtty;
        public long NormalQtty
        {
            get { return _normalQtty; }
            set { _normalQtty = value; }
        }
        private decimal _normalValue;
        public decimal NormalValue
        {
            get { return _normalValue; }
            set { _normalValue = value; }
        }
        private long _ptQtty;
        public long PtQtty
        {
            get { return _ptQtty; }
            set { _ptQtty = value; }
        }
        private decimal _ptValue;
        public decimal PtValue
        {
            get { return _ptValue; }
            set { _ptValue = value; }
        }
        private long _foreignBuyQtty;
        public long ForeignBuyQtty
        {
            get { return _foreignBuyQtty; }
            set { _foreignBuyQtty = value; }
        }
        private long _foreignSellQtty;
        public long ForeignSellQtty
        {
            get { return _foreignSellQtty; }
            set { _foreignSellQtty = value; }
        }
        private long _foreignRemainQtty;
        public long ForeignRemainQtty
        {
            get { return _foreignRemainQtty; }
            set { _foreignRemainQtty = value; }
        }
        private long _foreignTotalQtty;
        public long ForeignTotalQtty
        {
            get { return _foreignTotalQtty; }
            set { _foreignTotalQtty = value; }
        }
        public string MarketListed { set; get; }

        public StockDataModel(string symbol, decimal ceiling, decimal floor, string marketlisted)
        {
            this.Symbol = symbol;
            this.Ceiling = ceiling;
            this.Floor = floor;
            this.MarketListed = marketlisted;
        }
    }

    public struct CustomAttribute
    {
        private string _infoName;
        public string InfoName
        {
            get { return _infoName; }
            set { _infoName = value; }
        }
        private string _infoValue;
        public string InfoValue
        {
            get { return _infoValue; }
            set { _infoValue = value; }
        }
        private int _infoType;
        public int InfoType
        {
            get { return _infoType; }
            set { _infoType = value; }
        }
        private string _infoStyle;
        public string InfoStyle
        {
            get { return _infoStyle; }
            set { _infoStyle = value; }
        }
        private string _description;
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
    }
    public struct FinancialDetail
    {
        private string _detailName;
        public string DetailName
        {
            get { return _detailName; }
            set { _detailName = value; }
        }
        private string _detailValue;
        public string DetailValue
        {
            get { return _detailValue; }
            set { _detailValue = value; }
        }
        private int _detailType;
        public int DetailType
        {
            get { return _detailType; }
            set { _detailType = value; }
        }
        private string _description;
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
        private DateTime _lastUpdated;
        public System.DateTime LastUpdated
        {
            get { return _lastUpdated; }
            set { _lastUpdated = value; }
        }
    }
    public struct FinancialPeriod
    {
        private List<FinancialDetail> _financialInfo;
        public List<FinancialDetail> FinancialInfo
        {
            get { return _financialInfo; }
            set { _financialInfo = value; }
        }
        private DateTime _record;
        public System.DateTime Record
        {
            get { return _record; }
            set { _record = value; }
        }
        private string _description;
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
        private DateTime _lastUpdated;
        public System.DateTime LastUpdated
        {
            get { return _lastUpdated; }
            set { _lastUpdated = value; }
        }
    }
}
